databaseChangeLog:
  - changeSet:
      id: rename_table_points_to_houses
      author: hei

      preConditions:
        - onFail: WARN
        - tableExists:
            tableName: points

      changes:
        - renameTable:
            oldTableName: points
            newTableName: houses

  - changeSet:
      id: rename_column_house_to_name
      author: hei

      preConditions:
        - onFail: WARN
        - columnExists:
            tableName: houses
            columnName: house

      changes:
        - renameColumn:
            tableName: houses
            oldColumnName: house
            newColumnName: name

  - changeSet:
      id: change_column_reference_for_house_id
      author: hei

      preConditions:
        - onFail: WARN
        - columnExists:
            tableName: points_log
            columnName: house_id

      changes:
        - modifyDataType:
            tableName: points_log
            columnName: house_id
            newDataType: INT REFERENCES houses (id)
